package com.example;

class Parent {
    public String name = "Parent";
    public Parent() {
        System.out.println(111);
        sayName();
        System.out.println(222);
    }
    public void sayName() {
        System.out.println("say hi in parent : " + name);
    }
}

class Son extends Parent {
    public String name = "Son";
    public Son() {
        System.out.println(111);
        sayName();

    }
    public void sayName() {
        System.out.println("say hi in Son : " + name);
    }
}

public class Test {

    public static void main(String[] args) {
        new Son();
    }

}